﻿@{ ViewBag.Title = "OrderComplaint";}
@model Himall.Web.Areas.Admin.Models.WeekSettlementModel

<script>
    $(function () {

        $("#NewWeekSettlement").keyup(function () {
            value = value.replace(/[^\d\.]/g, '')
        });
    })


    function checkValue() {
        var text = $("#NewWeekSettlement").val();
        var value = parseInt($("#NewWeekSettlement").val());
        var type = /^[1-9]\d*$/;
        var re = new RegExp(type);
        if (text.match(re) == null) {
            $.dialog.tips("请输入大于零的整数!")
            return false;
        }
        if (value > 0) {
            if (value > 365) {
                $.dialog.tips("请输入小于等于365的整数！");
                return false;
            }
            else {
                return true;
            }
        }
        else {
            $.dialog.tips("请输入大于0的整数！");
            return false;
        }
    }

</script>
<div class="container">
    <ul class="nav nav-tabs-custom clearfix">
        <strong>结算周期</strong>
        <li type="statusTab"><a href="@Url.Action("Management")">结算管理</a></li>
        <li class="active"><a href="#">设置</a></li>
        <em class="primary-btn">
            <span class="glyphicon glyphicon-question-sign"></span>
            <div class="primary">
                <h3>温馨提示：</h3>
                <span>*</span><p></p>
            </div>
        </em>
    </ul>
    @using (Html.BeginForm("UpdateSettlementWeek", "Account", new { Area = "Admin" }, FormMethod.Post, new { id = "ShopGradeForm" }))
    {
        <div class="form-horizontal">
            <div class="form-group">
                <label class="col-sm-2 control-label" for="">当前结算周期(天)：</label>
                <label class="col-sm-2 control-label" style=" text-align:left;" for="">@Model.CurrentWeekSettlement</label>


            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="">新结算周期(天)：</label>
                <div class="col-sm-3">
                    <input type="text" name="NewWeekSettlement" id="NewWeekSettlement" class="form-control input-sm" onkeyup=" value = value.replace(/[^\d\.]/g, '')" />
                </div>

            </div>

            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="submit" class="btn btn-primary" id="submitWeek" onclick="return checkValue();">提 交</button>
                </div>
            </div>
        </div>
    }
</div>